package io.xxx.mario.task.api;

import lombok.Data;
import lombok.EqualsAndHashCode;

@Data
@EqualsAndHashCode(callSuper = true)
public class UpdateTaskRequest extends AbstractTaskRequest {

    private Long id;

    private Long updatedId;

    private String updatedName;

    @Override
    public void validate() {
        if (id == null) {
            throw new IllegalArgumentException("任务ID为空");
        }
        super.validate();
        if (updatedId == null) {
            throw new IllegalArgumentException("任务更新人ID为空");
        }
        if (updatedName == null) {
            throw new IllegalArgumentException("任务更新人姓名为空");
        }
    }
}
